package org.xjtu.weteam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import org.xjtu.weteam.model.domain.Project;
import org.xjtu.weteam.model.domain.User;

import java.util.List;

/**
 * @author Kevin
 */

@Mapper
public interface ProjectMapper extends BaseMapper<Project> {

    List<Project> listProjects(@Param("teamId")Integer teamId);

    Project projectSearchById(@Param("projectId") Integer projectId);

    /**
     * 添加项目
     * @param project
     * @return
     */
    int insertProject(Project project);
    @Update("update project set status = #{newStatus} where project_id = #{projectId}")
    int updateStatus(@Param("projectId") Integer projectId, @Param("newStatus") String newStatus);
}
